Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SwingSet): Report vat snapshot size delta on save #10935

Merged
merged 9 commits into from
Feb 13, 2025

Conversation

siarhei-agoric
Copy link
Contributor

closes: #10910

Description

Two changes:
1. move slog 'heap-snapshot-save' from vatKeeper.js to manager-subprocess-xsnap.js
2. track uncompressedSizeLoaded in a local variable inside createFromBundle()
   and report delta from makeSnapshot()

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

heap-snapshot-save slog entry now has a new uncompressedSizeDelta property representing the change in snapshot size in bytes at snapshot save time if a vat had been loaded from a snapshot. uncompressedSizeDelta is null if a vat had been started from a bundle without snapshot loaded.

Testing Considerations

Need to confirm that:

  • uncompressedSizeDelta is present in all heap-snapshot-save slog entries
  • null when no snapshot loaded
  • reflects the actual changes of snapshot size

Upgrade Considerations

None.

Copy link
Member

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after a little tweaking.

Copy link

cloudflare-workers-and-pages bot commented Feb 6, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: fe18cf6
Status: ✅  Deploy successful!
Preview URL: https://b797707d.agoric-sdk.pages.dev
Branch Preview URL: https://sliakh-10910-report-heap-sna.agoric-sdk.pages.dev

View logs

Copy link
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love that we're moving the heap snapshot slogging in a single place.

I think that if restartWorker is true, the delta will currently remain null (or stale) because we're never updating it with the size of the snapshot taken.

Also I guess the delta metric got stuck in the keyboard since it's not reported in the slog event ;)

@siarhei-agoric siarhei-agoric force-pushed the sliakh-10910-report-heap-snapshot-size-delta branch from f493ed3 to 60eab22 Compare February 7, 2025 20:53
Copy link
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed the snapshotStream bug. Thankfully our CI was screaming about it.

siarhei-agoric and others added 6 commits February 10, 2025 13:53
Two changes:
1. move slog 'heap-snapshot-save' from vatKeeper.js to manager-subprocess-xsnap.js
2. track uncompressedSizeLoaded in a local variable inside createFromBundle()
   and report delta from makeSnapshot()
move uncompressedSizeLoaded into saveSnapshot().
@siarhei-agoric siarhei-agoric force-pushed the sliakh-10910-report-heap-snapshot-size-delta branch from 077c8c5 to 35b5b67 Compare February 10, 2025 18:54
@siarhei-agoric siarhei-agoric added the automerge:squash Automatically squash merge label Feb 12, 2025
@mergify mergify bot merged commit f8d1b07 into master Feb 13, 2025
83 checks passed
@mergify mergify bot deleted the sliakh-10910-report-heap-snapshot-size-delta branch February 13, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report heap snapshot size delta
3 participants